package com.koron.sinoprobe.web.ledger.service.impl;

import com.koron.sinoprobe.web.ledger.bean.query.SpBillQuery;
import com.koron.sinoprobe.web.ledger.bean.vo.SpBills;
import com.koron.sinoprobe.web.ledger.mapper.SpBillsMapper;
import com.koron.sinoprobe.web.ledger.service.SpBillsService;
import org.koron.ebs.mybatis.SessionFactory;
import org.koron.ebs.mybatis.TaskAnnotation;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

import java.util.List;

/**
 * @author twcao
 * @title: SpBillsServiceImpl
 * @projectName GDH_EAM_V2
 * @description: 项目单据
 * @date 2022/4/2015:28
 */
@Service
public class SpBillsServiceImpl implements SpBillsService {

    @Override
    @TaskAnnotation("queryList")
    public List<SpBills> queryList(SessionFactory factory, SpBillQuery query) {
        Assert.hasText(query.getProjectId(), "项目id不能为空");
        SpBillsMapper mapper = factory.getMapper(SpBillsMapper.class);
        return mapper.queryList(query);
    }
}
